package com.crealth.model;

import java.io.Serializable;

import com.alibaba.fastjson.JSONObject;
import com.crealth.utils.Utils;

public class BankChannelModel implements Serializable {
	private static final long serialVersionUID = 3501L;

	private int id;  //银行 渠道
	private String bankName;  //银行机构名称
	private int professionType;  //职业类型 自雇、受薪、优良
	private String interestRate;  //利率
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	public int getProfessionType() {
		return professionType;
	}
	public void setProfessionType(int professionType) {
		this.professionType = professionType;
	}
	public String getInterestRate() {
		return interestRate;
	}
	public void setInterestRate(String interestRate) {
		this.interestRate = interestRate;
	}
	
	public JSONObject toJSONObject() {
		JSONObject jsonObj = new JSONObject();
		jsonObj.put("id", id);
		jsonObj.put("bankName", bankName);
		jsonObj.put("professionType", professionType);
		jsonObj.put("interestRate", interestRate);
		
		return jsonObj;
	}
	
	public void parseFromJson(JSONObject json) {
		id = Utils.getJsonIntValue(json, "id", 0);
		bankName = Utils.getJsonString(json, "bankName");
		professionType = Utils.getJsonIntValue(json, "professionType", 0);		
		interestRate = Utils.getJsonString(json, "interestRate");
	}
	
}
